public class ShelterQueue{
  Queue catQueue = new Queue();
  Queue dogQueue = new Queue();

  ShelterQueue(Queue dogs, Queue cats){
    this.catQueue = cats;
    this.dogQueue = dogs;
  }
  
  public void enqueue(Dog dog){
    dogQueue.enqueue(dog);
  }
  
  public void enqueue(Cat cat){
    catQueue.enqueue(cat);
  }
  
  public Object dequeueAny(){
    if(catQueue.peek() >= dogQueue.peek())
      return catQueue.dequeue();
    else return dogQueue.dequeue();
  }

  public Dog dequeueDog(){
    return dogQueue.dequeue();
  }
  public Cat dequeueCat(){
    return coatQueue.dequeue();     
  }

}